class Section < ActiveRecord::Base
	 belongs_to :vote # 單數
	 has_many :control_groups, :dependent => :destroy
	 has_many :target_question_boxes
	 has_many :questions, :through => :target_question_boxes
	 has_many :candidates, :through => :target_question_boxes
	 has_many :orgs, :through => :target_question_boxes

	 accepts_nested_attributes_for :control_groups, :reject_if => proc { |attributes| attributes['name'].blank? },:allow_destroy => true
end

